home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_u_z / vlistsam.zip / VLISTINT.H < prev    next >
C/C++ Source or Header  |  1992-09-21  |  4KB  |  85 lines

  1. #include "windows.h"
  2. #include "windowsx.h"
  3. #include "vlist.h"
  4.  
  5. typedef struct tagVLISTBox
  6.    {
  7.       HWND      hwnd;             // hwnd of this VLIST box
  8.       int       nId;              // Id of Control
  9.       HINSTANCE hInstance;        // Instance of parent
  10.       HWND      hwndParent;       // hwnd of parent of VLIST box
  11.       HWND      hwndList;         // hwnd of List box
  12.       WNDPROC   lpfnLBWndProc;    // Window procedure of list box
  13.       int       nchHeight;        // Height of text line
  14.       int       nLines;           // Number of lines in listbox
  15.       LONG      styleSave;        // Save the Style Bits
  16.       WORD      VLBoxStyle;       // List Box Style
  17.       HANDLE    hFont;            // Font for List box
  18.       LONG      lToplIndex;      // Top logical record number;
  19.       int       nCountInBox;      // Number of Items in box.
  20.       LONG      lNumLogicalRecs;  // Number of logical records
  21.       VLBSTRUCT vlbStruct;        // Buffer to communicate to app
  22.       WORD      wFlags;           // Various flags fot the VLB
  23.                                   //
  24.                                   // 0x01 - HasStrings
  25.                                   // 0x02 - Use Data Values
  26.                                   // 0x04 - Multiple Selections
  27.                                   // 0x08 - Ok for parent to have focus
  28.                                   // 0x10 - Control has focus
  29.  
  30.       LONG      lSelItem;         // List of selected items
  31.       int       nvlbRedrawState;  // Redraw State
  32. } VLBOX;
  33.  
  34. typedef VLBOX NEAR *PVLBOX;
  35. typedef VLBOX FAR  *LPVLBOX;
  36.  
  37.  
  38. #define IDS_VLBOXNAME  1
  39. #define VLBLBOXID      100
  40. #define VLBEDITID      101
  41.  
  42. #define HASSTRINGS     0x01       // List box stores strings
  43. #define USEDATAVALUES  0x02       // Use Data Values to talk to parent
  44. #define MULTIPLESEL    0x04       // VLB has extended or multiple selection
  45. #define PARENTFOCUS    0x08       // Ok for parent to have focus
  46. #define HASFOCUS       0x10       // 0x10 - Control has focus
  47.  
  48. LRESULT _export CALLBACK VListBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  49. LRESULT CALLBACK _loadds LBSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  50.  
  51. BOOL RegisterVListBox(HANDLE hInstance);
  52. LONG VLBMessageItemHandler( PVLBOX pVLBox,  WORD message, LPSTR lpfoo);
  53. LONG VLBParentMessageHandler( PVLBOX pVLBox, UINT message, WPARAM wParam, LPARAM lParam);
  54. LONG VLBNcCreateHandler( HWND hwnd, LPCREATESTRUCT lpcreateStruct);
  55. LONG VLBCreateHandler( PVLBOX pVListBox, HWND hwnd, LPCREATESTRUCT lpcreateStruct);
  56. void VLBNcDestroyHandler(HWND hwnd,  PVLBOX pVListBox, WPARAM wParam, LPARAM lParam);
  57. void VLBSetFontHandler( PVLBOX pVListBox, HANDLE hFont, BOOL fRedraw);
  58. int  VLBScrollDownLine( PVLBOX pVLBox);
  59. int  VLBScrollUpLine( PVLBOX pVLBox);
  60. int  VLBScrollDownPage( PVLBOX pVLBox, int nAdjustment);
  61. int  VLBScrollUpPage( PVLBOX pVLBox, int nAdjustment);
  62. void UpdateVLBWindow( PVLBOX pVLBox, LPRECT lpRect);
  63. int  VLBFindPage( PVLBOX pVLBox, LONG lFindRecNum, BOOL bUpdateTop);
  64. int  VLBFindPos( PVLBOX pVLBox, int nPos);
  65. void VLBFirstPage( PVLBOX pVLBox);
  66. void VLBLastPage( PVLBOX pVLBox);
  67. LONG vlbSetCurSel( PVLBOX pVLBox, int nOption, LONG lParam);
  68. int  vlbFindData( PVLBOX pVLBox, LONG lData);
  69. void VLBSizeHandler( PVLBOX pVLBox, int nItemHeight);
  70. int  vlbInVLB( PVLBOX pVLBox, LONG lData);
  71.  
  72. void vlbRedrawOff(PVLBOX pVLBox);
  73. void vlbRedrawOn(PVLBOX pVLBox);
  74.  
  75. BOOL TestSelectedItem(PVLBOX pVLBox, VLBSTRUCT vlbStruct);
  76. void SetSelectedItem(PVLBOX pVLBox);
  77.  
  78. void vlbPGDN(PVLBOX pVLBox);
  79. void vlbPGUP(PVLBOX pVLBox);
  80.  
  81. void vlbLineDn(PVLBOX pVLBox);
  82. void vlbLineUp(PVLBOX pVLBox);
  83.  
  84. extern HANDLE  hInstance;              // Global instance handle for  DLL
  85.